package appname.example.com.testmvvm;

import android.databinding.BaseObservable;
import android.databinding.Bindable;

import com.android.databinding.library.baseAdapters.BR;

public class Testbean extends BaseObservable {

    private String name;
    private String name1;
    private String name2;
    private String name3;

    @Bindable
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        notifyPropertyChanged(BR.name);
    }

    @Bindable
    public String getName1() {
        return name1;
    }

    public void setName1(String name1) {
        this.name1 = name1;
        notifyPropertyChanged(BR.name1);

    }

    @Bindable
    public String getName2() {
        return name2;
    }

    public void setName2(String name2) {
        this.name2 = name2;
        notifyPropertyChanged(BR.name2);

    }

    @Bindable
    public String getName3() {
        return name3;
    }

    public void setName3(String name3) {
        this.name3 = name3;
        notifyPropertyChanged(BR.name3);
    }


    //仅写DEMO 用 实现克隆方法
    @Override
    public Testbean clone() throws CloneNotSupportedException {
        Testbean bean = null;
        try {
            bean = (Testbean) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return bean;
    }
}
